// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期：2024-04-24 10:28:09
// 生成路径: api/v1/business/user_agents.go
// 生成人：周志雄
// desc:代理商用户相关参数
// company:云南奇讯科技有限公司
// ==========================================================================

package business

import (
	"github.com/gogf/gf/v2/frame/g"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/business/model"
)

// UserAgentsSearchReq 分页请求参数
type UserAgentsSearchReq struct {
	g.Meta   `path:"/list" tags:"代理商用户" method:"get" summary:"代理商用户列表"`
	Username string `p:"username" dc:"用户名"`                                //用户名
	Name     string `p:"name" dc:"姓名"`                                     //姓名
	Phone    string `p:"phone" dc:"电话"`                                    //电话
	Status   string `p:"status" dc:"状态 1正常 -1禁用"`                          //状态 1正常 -1禁用
	AgentId  string `p:"agentId" v:"agentId@integer#代理类型需为整数" dc:"代理类型ID"` //代理类型
	PageNum  int    `p:"pageNum" dc:"当前页码"`                                //当前页码
	PageSize int    `p:"pageSize" dc:"每页数"`                                //每页数
	commonApi.Author
}

// UserAgentsSearchRes 列表返回结果
type UserAgentsSearchRes struct {
	g.Meta `mime:"application/json"`
	commonApi.ListRes
	List []*model.UserAgentsListResVo `json:"list"`
}

// UserAgentsAddReq 添加操作请求参数
type UserAgentsAddReq struct {
	g.Meta `path:"/add" tags:"代理商用户" method:"post" summary:"代理商用户添加"`
	commonApi.Author
	Username string `p:"username" v:"required#用户名不能为空" dc:"用户名"`
	Password string `p:"password" v:"required#密码不能为空" dc:"密码"`
	Name     string `p:"name" v:"required#姓名不能为空" dc:"姓名"`
	Phone    string `p:"phone" dc:"电话"`
	AgentId  int    `p:"agentId" dc:"代理商类型ID"`
}

// UserAgentsAddRes 添加操作返回结果
type UserAgentsAddRes struct {
	commonApi.EmptyRes
}

// UserAgentsEditReq 修改操作请求参数
type UserAgentsEditReq struct {
	g.Meta `path:"/edit" tags:"代理商用户" method:"put" summary:"代理商用户修改"`
	commonApi.Author
	Id       int    `p:"id" v:"required#主键ID不能为空" dc:"主键"`
	Username string `p:"username" v:"required#用户名不能为空" dc:"用户名"`
	Password string `p:"password" v:"required#密码不能为空" dc:"密码"`
	Name     string `p:"name" v:"required#姓名不能为空" dc:"姓名"`
	Phone    string `p:"phone" dc:"电话"`
	Status   string `p:"status" v:"required#状态 1正常 -1禁用不能为空" dc:"状态 1正常 -1禁用不能为空"`
	AgentId  int    `p:"agentId" dc:"代理商类型ID"`
}

// UserAgentsEditRes 修改操作返回结果
type UserAgentsEditRes struct {
	commonApi.EmptyRes
}

// UserAgentsGetReq 获取一条数据请求
type UserAgentsGetReq struct {
	g.Meta `path:"/get" tags:"代理商用户" method:"get" summary:"获取代理商用户信息"`
	commonApi.Author
	Id int `p:"id" v:"required#主键必须" dc:"主键"` //通过主键获取
}

// UserAgentsGetRes 获取一条数据结果
type UserAgentsGetRes struct {
	g.Meta `mime:"application/json"`
	*model.UserAgentsInfoResVo
}

// UserAgentsDeleteReq 删除数据请求
type UserAgentsDeleteReq struct {
	g.Meta `path:"/delete" tags:"代理商用户" method:"delete" summary:"删除代理商用户"`
	commonApi.Author
	Ids []int `p:"ids" v:"required#主键必须" dc:"主键ID列表"` //通过主键删除
}

// UserAgentsDeleteRes 删除数据返回
type UserAgentsDeleteRes struct {
	commonApi.EmptyRes
}
